import {QueryPage} from "@/api/common/type.ts";

// 根据母件信息查询子件配置
export interface specificationDetailQuery {
    materialName: string | undefined;  // 物料
    specification: string | undefined;  // 规格
    length: number | undefined;  // 高度
    breadth: number | undefined;  // 宽度
    number:number | undefined;  // 数量
    colorPrice:number | undefined; // 颜色价格
    materialType:string | undefined; // 材质
}


export type BomMaterialDto = {
    id: number | undefined;
    bomId: number | undefined;
    materialId: number | undefined;
    materialName: string | undefined;
    materialCode: string | undefined;
    quantity: number | undefined;
    unitId: number | undefined;
    unitName: string | undefined;
    specification: string | undefined;
    cost: number | undefined;
    purchasePrice:  number | undefined;
    description: string | undefined;

    brand: number | undefined,  // 品牌
    manufacturer: number | undefined,  // 生产厂家
    materialType: string | undefined,  // 材质
    unitWeight: number | undefined,  // 米重(kg/m)
    unitArea: number | undefined,  // 米面积(m²/m)
    totalWeight: number | undefined,  // 总重(kg/件)
    thickness:number | undefined, // 厚度(mm)
};

export type BomProcessDto = {
    id: number | undefined;
    bomId: number | undefined;
    processId: number | undefined;
    processCode: string | undefined;
    processName: string | undefined;
    cost: number | undefined;
    description: string | undefined;
};

// BOM信息用于新增或修改时提交
export interface specificationDetailForm{
    id: number | undefined,
    bomCode: string | undefined,  // bom编码
    bomName: string | undefined,  // bom名称
    unitName:string | undefined, // 单位
    specification: string |  undefined,  // 规格
    brand: string |  undefined,   // 品牌
    manufacturer: string |  undefined,  // 生产厂家
    materialType: string |  undefined,  // 材质
    unitWeight: number | undefined,  // 米重(kg/m)
    unitArea: number | undefined,  // 米面积(m²/m)
    totalWeight:number | undefined,  // 总重(kg/件)
    thickness:number | undefined, // 厚度(mm)
    length:number |  undefined,  // 高度
    breadth:number |  undefined, // 宽度
    quantity:number | undefined, // 数量
    purchasePrice:number |  undefined, // 单价
    materialTotalPrices? : number | undefined,  // 花费物料总价
    processTotalPrices? : number | undefined,  // 花费工序总价
    totalPrices? : number | undefined,  // 总价
    description: number | undefined,  // 描述
    isActive: number | undefined,   // 是否启用  0： 启用  1：禁用
    bomMaterialDtoList: BomMaterialDto[];  // bom的物料列表
}
